Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Oracle® Ultra Search Java API Reference 10g Release 2 (10.2) B14221-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ultrasearch.query
Class Equals

`java.lang.Object
oracle.ultrasearch.query.Equals`

All Implemented Interfaces:
  Query

public class Equals
extends java.lang.Object
implements Query

Find documents with an attribute that equals a value.

Equality is interpreted differently for each attribute type. For DateAttribute, only the year, month, day parts of Date values are used in comparison. For NumberAttribute, only 32 bits of precision are used in comparison. For StringAttribute, equality is based on hash value, so there is a small probability of error when results are returned.

Since:
  9.0.2

Constructor Summary
`Equals(DateAttribute att, java.util.Date d)` Construct a Equals query on a StringAttribute.
`Equals(NumberAttribute att, java.math.BigDecimal bd)` Construct a Equals query on a StringAttribute.
`Equals(StringAttribute att, java.lang.String s)` Construct a Equals query on a StringAttribute.

Method Summary
`java.lang.String` | `compile()` compile into a query string.
`java.lang.String` | `compileForCount()` compile into a query string for counting hits.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Equals

    public Equals(StringAttribute att,
                  java.lang.String s)

  Construct a Equals query on a StringAttribute.
Parameters:
  `att` - a string attribute
  `s` - a String value, not null

### Equals

    public Equals(DateAttribute att,
                  java.util.Date d)

  Construct a Equals query on a StringAttribute.
Parameters:
  `att` - a date attribute
  `d` - a Date value, not null

### Equals

    public Equals(NumberAttribute att,
                  java.math.BigDecimal bd)

  Construct a Equals query on a StringAttribute.
Parameters:
  `att` - a number attribute
  `bd` - a BigDecimal value, not null

Method Detail

### compile

    public java.lang.String compile()

  compile into a query string.
  Specified by:
    `compile` in interface `Query`
  Returns:
    a query string representing this query.

### compileForCount

    public java.lang.String compileForCount()

  compile into a query string for counting hits.
  Specified by:
    `compileForCount` in interface `Query`
  Returns:
    a query string representing this query.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Oracle® Ultra Search Java API Reference 10g Release 2 (10.2) B14221-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003,2005, Oracle. All Rights Reserved.